package com.xs.designpattern;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.function.Supplier;

/**
 * @author xs
 */
@RequiredArgsConstructor
@Getter
public enum CoinType {
    /**
     * 铜币
     */
    COPPER(CopperCoin::new),
    /**
     * 金币
     */
    GOLD(GoldCoin::new);

    private final Supplier<Coin> constructor;
}
